<?php
class property
    {
    public $contentId;
    public $htmlId;
    public $contentData;
    public $component;
    private $dom;

    function readProperty()
        {
        require_once ("../../system/api/simplehtmldom/simple_html_dom.php");


        // user check

        $this->contentId  =$_REQUEST['content_id'];
        $this->htmlId     =$_REQUEST['html_id'];

        $this->contentData=db::getDataLine("content", "id='{$this->contentId}'");

        //print_r($this->contentData);
        
        $contentOrginal   =file::readTextFile($this->contentData['content_filename'], true);

        $dom              =str_get_html($contentOrginal);
        
        //echo $contentOrginal;

        //$domArray=$dom->find("[com=text_editor]");
        $domArray         =$dom->find("[id={$this->htmlId}]");

        foreach ($domArray as $this->component)
            {
            //$text=$item->innertext;
            //echo "TEXT:".$text;
            //echo "src".$item->src;
            //$component = $item;
            }
        }

    function saveContent() {
        
        
        
     /*  $domArray         =$dom->find("[id={$this->htmlId}]");

        foreach ($domArray as $this->component)
            {
            //$text=$item->innertext;
            //echo "TEXT:".$text;
            //echo "src".$item->src;
            //$component = $item;
            } */
        
        
        
        
        
        
    }
    }
?>
